﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using RB.Web.Security.Rdb;

namespace RB.Web.Security.Wcf
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的类名“AuthenticationService”。
    public class AuthenticateService : IAuthenticateService
    {
        public UserSession GetSession(string appCode, string ticket, int userIsOnlineTimeWindow)
        {
            DbAuthenticateService service = new DbAuthenticateService();
            return service.GetSession(appCode, ticket, userIsOnlineTimeWindow);
        }

        public void SignOut(string ticket)
        {
            DbAuthenticateService service = new DbAuthenticateService();
            service.SignOut(ticket);
        }

        public UserSession CreateSession(string appCode, string username, string ipAddress, string httpForwarded)
        {
            DbAuthenticateService service = new DbAuthenticateService();
            return service.CreateSession(appCode, username, ipAddress, httpForwarded);
        }

        public void LogPasswordAttemp(string appCode, string username, string password, string ipAddress, string httpForwarded)
        {
            DbAuthenticateService service = new DbAuthenticateService();
            service.LogPasswordAttemp(appCode, username, password, ipAddress, httpForwarded);
        }
    }
}
